import http from '@/http/index.ts'
import { CommissionRatioListParam, CommissionRatio } from './type'

// 获取提成比例列表（分页）
export const getCommissionRatioListApi = (params: CommissionRatioListParam) => {
  return http.get('/commissionRatio/list', params)
}

// 新增提成比例
export const addCommissionRatioApi = (data: CommissionRatio) => {
  return http.post('/commissionRatio', data)
}

// 编辑提成比例
export const editCommissionRatioApi = (data: CommissionRatio) => {
  return http.put('/commissionRatio', data)
}

// 删除提成比例
export const deleteCommissionRatioApi = (id: number) => {
  return http.delete(`/commissionRatio/${id}`)
} 